tools/libxc: Drop copy-in in xc_physinfo()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 23 Dec 2021 16:10:15 +0000 (16:10 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 5 Jan 2022 09:44:26 +0000 (09:44 +0000)
commit06cc1f886f323394004190f931266ab328ec8773
tree632ec501d1a94d77b57b48eea09610dfd4743be2
parentaf0c5430a82c77432729d61c9b409dd32c477b20
tools/libxc: Drop copy-in in xc_physinfo()

The first thing XEN_SYSCTL_physinfo does is zero op->u.physinfo.

Do not copy-in.  It's pointless, and most callers don't initialise their
xc_physinfo_t buffer to begin with.  Remove the redundant zeroing from the
remaining callers.

Spotted by Coverity.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Wei Chen <Wei.Chen@arm.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
tools/libs/ctrl/xc_misc.c
tools/libs/light/libxl.c
tools/libs/stat/xenstat.c
tools/misc/xenpm.c
tools/xenmon/xenbaked.c
tools/xentrace/xentrace.c